/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.persistencia.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author kenny
 */
@Embeddable
public class ClasexrecursoPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "nClsId")
    private int nClsId;
    @Basic(optional = false)
    @NotNull
    @Column(name = "nRcrId")
    private int nRcrId;

    public ClasexrecursoPK() {
    }

    public ClasexrecursoPK(int nClsId, int nRcrId) {
        this.nClsId = nClsId;
        this.nRcrId = nRcrId;
    }

    public int getNClsId() {
        return nClsId;
    }

    public void setNClsId(int nClsId) {
        this.nClsId = nClsId;
    }

    public int getNRcrId() {
        return nRcrId;
    }

    public void setNRcrId(int nRcrId) {
        this.nRcrId = nRcrId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) nClsId;
        hash += (int) nRcrId;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ClasexrecursoPK)) {
            return false;
        }
        ClasexrecursoPK other = (ClasexrecursoPK) object;
        if (this.nClsId != other.nClsId) {
            return false;
        }
        if (this.nRcrId != other.nRcrId) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.persistencia.domain.ClasexrecursoPK[ nClsId=" + nClsId + ", nRcrId=" + nRcrId + " ]";
    }
    
}
